package com.dutao.designpattern.a_factory.normalfactory;

/**
 * 类的介绍：请替换
 * Created by dutao on 2018/5/4.
 */
public class SendFactory {

  public Sender produce(String type) {
    if ("mail".equals(type)) {
      return new MailSender();
    } else if ("sms".equals(type)) {
      return new SmsSender();
    } else {
      System.out.println("请输入正确的类型!");
      return null;
    }
  }
}
